<?php

require_once PHP_UI_PATH . DS . 'UIControl.php';

class Text extends UIControl {

    function __construct() {
        $this->addStyleClass("text");
    }

    protected function getControlRendering() {
        if ($this->getRequired()) {
            $this->addStyleClass("required");
        }
        $render = "<input type='text' name='Values[{$this->getName()}]' id='_{$this->getId()}' class='{$this->getStyleClasses()}' value='{$this->getValue()}' />";
        return $render;
    }

}

?>
